<!DOCTYPE html>
<html lang="zh-Hans-CN">
<head>
  <% include("/include/header.html",{"title":"服务器信息"}){} %>
</head>
<body class="layui-fluid">
  <div class="layui-row layui-col-space10">
      <div class="layui-col-md3">
          <div class="layui-card">
              <div class="layui-card-header">CPU</div>
              <div class="layui-card-body">
                  <table class="layui-table" lay-skin="line">
                      <colgroup>
                          <col width="40%">
                          <col width="60%">
                      </colgroup>
                      <thead>
                          <tr>
                              <th>属性</th>
                              <th>值</th>
                          </tr>
                      </thead>
                      <tbody> <% var cpu = server.cpu; %>
                          <tr>
                              <td>核心数</td>
                              <td>${cpu.cpuNum}</td>
                          </tr>
                          <tr>
                              <td>用户使用率</td>
                              <td>${cpu.used}%</td>
                          </tr>
                          <tr>
                              <td>系统使用率</td>
                              <td>${cpu.sys}%</td>
                          </tr>
                          <tr>
                              <td>当前空闲率</td>
                              <td>${cpu.free}%</td>
                          </tr>
                      </tbody>
                  </table>
              </div>
          </div>
      </div>
      <div class="layui-col-md5">
          <div class="layui-card">
              <div class="layui-card-header">内存</div>
              <div class="layui-card-body">
                  <table class="layui-table" lay-skin="line">
                      <colgroup>
                          <col width="30%">
                          <col width="30%">
                          <col width="30%">
                      </colgroup>
                      <thead>
                          <tr>
                              <th>属性</th>
                              <th>内存</th>
                              <th>JVM</th>
                          </tr>
                      </thead>
                      <tbody><% var mem = server.mem; var jvm = server.jvm; %>
                          <tr>
                              <td>总内存</td>
                              <td>${mem.total}G</td>
                              <td>${jvm.total}M</td>
                          </tr>
                          <tr>
                              <td>已用内存</td>
                              <td>${mem.used}G</td>
                              <td>${jvm.used}M</td>
                          </tr>
                          <tr>
                              <td>剩余内存</td>
                              <td>${mem.free}G</td>
                              <td>${jvm.free}M</td>
                          </tr>
                          <tr>
                              <td>使用率</td>
                              <td>${mem.usage}%</td>
                              <td>${jvm.usage}%</td>
                          </tr>
                      </tbody>
                  </table>
              </div>
          </div>
      </div>
      <div class="layui-col-md4">
          <div class="layui-card">
              <div class="layui-card-header">服务器信息</div>
              <div class="layui-card-body">
                  <table class="layui-table" lay-skin="line">
                      <colgroup>
                          <col width="35%">
                          <col width="65%">
                      </colgroup>
                      <thead>
                          <tr>
                              <th>属性</th>
                              <th>值</th>
                          </tr>
                      </thead>
                      <tbody><% var sys = server.sys; %>
                          <tr>
                              <td>服务器名称</td>
                              <td>${sys.computerName}</td>
                          </tr>
                          <tr>
                              <td>操作系统</td>
                              <td>${sys.osName}</td>
                          </tr>
                          <tr>
                              <td>服务器IP</td>
                              <td>${sys.computerIp}</td>
                          </tr>
                          <tr>
                              <td>系统架构</td>
                              <td>${sys.osArch}</td>
                          </tr>
                      </tbody>
                  </table>
              </div>
          </div>
      </div>
      <div class="layui-col-md12">
          <div class="layui-card">
              <div class="layui-card-header">Java虚拟机信息</div>
              <div class="layui-card-body">
                  <table class="layui-table" lay-skin="line">
                      <colgroup>
                          <col width="15%">
                          <col width="35%">
                          <col width="15%">
                          <col width="35%">
                      </colgroup>
                      <thead>
                          <tr>
                              <th>属性</th>
                              <th>值</th>
                              <th>属性</th>
                              <th>值</th>
                          </tr>
                      </thead>
                      <tbody>
                          <tr>
                              <td>Java名称</td>
                              <td>${jvm.name}</td>
                              <td>Java版本</td>
                              <td>${jvm.version}</td>
                          </tr>
                          <tr>
                              <td>启动时间</td>
                              <td>${jvm.startTime}</td>
                              <td>运行时长</td>
                              <td>${jvm.runTime}</td>
                          </tr>
                          <tr>
                              <td>安装路径</td>
                              <td colspan="3">${jvm.home}</td>
                          </tr>
                          <tr>
                              <td>项目路径</td>
                              <td colspan="3">${sys.userDir}</td>
                          </tr>
                          <tr>
                              <td>运行参数</td>
                              <td colspan="3">${jvm.inputArgs}</td>
                          </tr>
                      </tbody>
                  </table>
              </div>
          </div>
      </div>
      <div class="layui-col-md12">
          <div class="layui-card">
              <div class="layui-card-header">磁盘状态</div>
              <div class="layui-card-body">
                  <table class="layui-table" lay-skin="line">
                      <colgroup>
                          <col width="12.5%">
                          <col width="12.5%">
                          <col width="25%">
                          <col width="12.5%">
                          <col width="12.5%">
                          <col width="12.5%">
                      </colgroup>
                      <thead>
                          <tr>
                              <th>盘符路径</th>
                              <th>文件系统</th>
                              <th>盘符类型</th>
                              <th>总大小</th>
                              <th>可用大小</th>
                              <th>已用大小</th>
                              <th>已用百分比</th>
                          </tr>
                      </thead>
                      <tbody><% for(item in server.sysFiles) { %>
                          <tr>
                              <td>${item.dirName}</td>
                              <td>${item.sysTypeName}</td>
                              <td>${item.typeName}</td>
                              <td>${item.total}G</td>
                              <td>${item.free}G</td>
                              <td>${item.used}G</td>
                              <td>${item.usage}%</td>
                          </tr>
                      <%}%></tbody>
                  </table>
              </div>
          </div>
      </div>
  </div>
<script>
  $base.removeLoading();
</script>

</body>
</html>
